import * as types from "./mutation-types";
import Api from "api/api";
const state = {
  appList: [],
// systemLog: "",
};

const getters = {
  appList: state => state.appList,
  // systemLog: state => state.systemLog,
};

const actions = {
  //应用列表
  appListUsingPOSTS({ commit }, param) {
    return Api.appListUsingPOST(param).then(ret => {
      commit(types.UPDATE_APP_LIST, ret.data);
      return ret;
    });
  },
  // appSystemLog({ commit }, param) {
  //   return Api.systemLogListUsingPOST(param).then(ret => {
  //     commit(types.UPDATE_SYST_LIST, ret.data);
  //     return ret;
  //   });
  // }
};
const mutations = {
  [types.UPDATE_APP_LIST](state, payload) {
    state.appList = payload;
  },
  // [types.UPDATE_SYST_LIST](state, payload) {
  //   state.systemLog = payload;
  // }
};

export default {
  state,
  getters,
  actions,
  mutations
};
